#include<bits/stdc++.h>

using namespace std;

int main() {
    int a[10];

    for (int i = 0; i <= 9; i++)
        cin >> a[i];
    //swap(a[i],a[n-1-i])
    for (int i = 0; i <= 9; i++) {
        swap(a[i], a[9 - i]);
        //
        for (int j = 0; j <= 9; j++) {
            cout << a[j] << " ";
        }
        cout << endl;
        system("PAUSE");
    }


    for (int i = 0; i <= 9; i++)
        cout << a[i] << endl;


    return 0;
}
